﻿
using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	
	/// <summary>	 
	/// 会员地址薄
	/// </summary>
	public class DbAddressBook
	{ 
		#region DbAddressBook
		/// <summary>
		/// 
		/// </summary>
		public DbAddressBook()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public DbAddressBook(Int32 addressId)
		{
			this.addressId = addressId;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public DbAddressBook(DataRow dr)
		{
			int.TryParse(Convert.ToString(dr["addressId"]),out addressId);
			this.address = Convert.ToString(dr["address"]);
			this.address2 = Convert.ToString(dr["address2"]);
			this.zipCode = Convert.ToString(dr["zipCode"]);
			this.city = Convert.ToString(dr["city"]);
			this.state = Convert.ToString(dr["state"]);
			this.country = Convert.ToString(dr["country"]);
			this.tel = Convert.ToString(dr["tel"]);
			int.TryParse(Convert.ToString(dr["addressType"]),out addressType);
			int.TryParse(Convert.ToString(dr["userId"]),out userId);
			int.TryParse(Convert.ToString(dr["sex"]),out sex);
			this.firstName = Convert.ToString(dr["firstName"]);
			this.lastName = Convert.ToString(dr["lastName"]);
			
		}
		#endregion
		
		
		#region AddressId
		private Int32 addressId;
		/// <summary>	 
		/// 
		/// AutoInc
		/// PK
		/// </summary>
		public Int32 AddressId
		{
			get{ return addressId; }
			set{ addressId= value; }
		}
		#endregion
		
		#region Address
		private System.String address;
		/// <summary>	 
		/// 地址1
		/// </summary>
		public System.String Address
		{
			get{ return address; }
			set{ address= value; }
		}
		#endregion
		
		#region Address2
		private System.String address2;
		/// <summary>	 
		/// 地址2
		/// </summary>
		public System.String Address2
		{
			get{ return address2; }
			set{ address2= value; }
		}
		#endregion
		
		#region ZipCode
		private System.String zipCode;
		/// <summary>	 
		/// 邮编
		/// </summary>
		public System.String ZipCode
		{
			get{ return zipCode; }
			set{ zipCode= value; }
		}
		#endregion
		
		#region City
		private System.String city;
		/// <summary>	 
		/// 所在城市
		/// </summary>
		public System.String City
		{
			get{ return city; }
			set{ city= value; }
		}
		#endregion
		
		#region State
		private System.String state;
		/// <summary>	 
		/// 所在省份
		/// </summary>
		public System.String State
		{
			get{ return state; }
			set{ state= value; }
		}
		#endregion
		
		#region Country
		private System.String country;
		/// <summary>	 
		/// 国家
		/// </summary>
		public System.String Country
		{
			get{ return country; }
			set{ country= value; }
		}
		#endregion
		
		#region Tel
		private System.String tel;
		/// <summary>	 
		/// 联系电话
		/// </summary>
		public System.String Tel
		{
			get{ return tel; }
			set{ tel= value; }
		}
		#endregion
		
		#region AddressType
		private Int32 addressType;
		/// <summary>	 
		/// 地址类型
		/// 0-shipping 1-billing
		/// </summary>
		public Int32 AddressType
		{
			get{ return addressType; }
			set{ addressType= value; }
		}
		#endregion
		
		#region UserId
		private Int32 userId;
		/// <summary>	 
		/// 对应会员
		/// </summary>
		public Int32 UserId
		{
			get{ return userId; }
			set{ userId= value; }
		}
		#endregion
		
		#region Sex
		private Int32 sex;
		/// <summary>	 
		/// 性别
		/// </summary>
		public Int32 Sex
		{
			get{ return sex; }
			set{ sex= value; }
		}
		#endregion
		
		#region FirstName
		private System.String firstName;
		/// <summary>	 
		/// 姓
		/// </summary>
		public System.String FirstName
		{
			get{ return firstName; }
			set{ firstName= value; }
		}
		#endregion
		
		#region LastName
		private System.String lastName;
		/// <summary>	 
		/// 名
		/// </summary>
		public System.String LastName
		{
			get{ return lastName; }
			set{ lastName= value; }
		}
		#endregion

	}
}
